package com.qf.spring.test;

import com.qf.spring.pojo.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 郑大仙丶
 * @version 1.0
 * @date 2021/3/19 10:03
 *
 * 测试DI注入值
 */
public class Demo4 {

    @Test
    public void test(){
        ApplicationContext ac = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");

        User user = (User) ac.getBean("user");

        System.out.println(user);
    }

}
